<?php
namespace app\common\business;

use app\common\model\mysql\Admin as AdminModel;
class Admin {
    public function getAdminByRoleId($roleId, $limit = 10) {
        $model = new AdminModel();
        $results = $model->getAdminByRoleId($roleId, $limit);
        if (empty($results)) {
            return [];
        }
        $addIds = [
            1=>'牛逼',
            2=>'真牛逼',
            3=>'真TM牛逼',
        ];
        foreach ($results as $k=>$result){
            $results[$k]['addTitle'] = $addIds[$result['add_id']] ?? '其他';
        }
        return $results;
    }
}